Boost-inv 2 Click
Boost-inv 2 Click demo application is developed using the NECTO Studio, ensuring compatibility with mikroSDK's open-source libraries and tools. Designed for plug-and-play implementation and testing, the demo is fully compatible with all development, starter, and mikromedia boards featuring a mikroBUS™ socket.
Click Library
- Author : MikroE Team
- Date : Dec 2019.
- Type : SPI type
Software Support
Example Description
First increse positiv voltage by 2V every 3 seconda, then decrese negative value for -2v every 3 seconds.
Example Libraries
- MikroSDK.Board
- MikroSDK.Log
- Click.Boostinv2
Example Key Functions
- boostinv2_cfg_setup Config Object Initialization function.
void boostinv2_cfg_setup(boostinv2_cfg_t *cfg)
Config Object Initialization function.
Click configuration structure definition.
Definition boostinv2.h:149
- boostinv2_init Initialization function.
BOOSTINV2_RETVAL boostinv2_init(boostinv2_t *ctx, boostinv2_cfg_t *cfg)
Initialization function.
Click ctx object definition.
Definition boostinv2.h:130
- boostinv2_default_cfg Click Default Configuration function.
void boostinv2_default_cfg(boostinv2_t *ctx)
Click Default Configuration function.
- boostinv2_set_positive_voltage Functions for set positive output voltage.
void boostinv2_set_positive_voltage(boostinv2_t *ctx, uint16_t voltage)
Sets postive voltage.
- boostinv2_set_negative_voltage Functions for set negative output voltage.
void boostinv2_set_negative_voltage(boostinv2_t *ctx, uint16_t voltage)
Sets negative voltage.
- boostinv2_generic_transfer Generic transfer function.
void boostinv2_generic_transfer(boostinv2_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len)
Generic transfer function.
Application Init
Initializes Driver init and enable chip
{
log_cfg_t log_cfg;
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, "---- Application Init ----" );
}
#define BOOSTINV2_MAP_MIKROBUS(cfg, mikrobus)
Definition boostinv2.h:66
void boostinv2_enable(boostinv2_t *ctx)
Enable analog pin.
void application_init(void)
Definition main.c:39
#define MIKROBUS_POSITION_BOOSTINV2
Definition main.c:29
Application Task
Changes the positive and negative output voltage. Positive output voltage goes from 5V to 15V. Negative output voltage goes from -5V to -15V
{
log_printf( &logger, "VOUT = 6V\r\n");
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
log_printf( &logger, "VOUT = 8V\r\n");
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
log_printf( &logger, "VOUT = 12V\r\n");
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
log_printf( &logger, "VOUT = 14V\r\n");
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
log_printf( &logger, "VOUT = 12V\r\n");
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
log_printf( &logger, "VOUT = 8V\r\n");
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
log_printf( &logger, "VOUT = -5V\r\n");
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
log_printf( &logger, "VOUT = -7V\r\n");
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
log_printf( &logger, "VOUT = -13V\r\n");
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
log_printf( &logger, "VOUT = -7V\r\n");
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
}
#define BOOSTINV2_POS_VOUT_6V
Definition boostinv2.h:90
#define BOOSTINV2_POS_VOUT_12V
Definition boostinv2.h:96
#define BOOSTINV2_POS_VOUT_14V
Definition boostinv2.h:98
#define BOOSTINV2_POS_VOUT_8V
Definition boostinv2.h:92
#define BOOSTINV2_NEG_VOUT_5V
Definition boostinv2.h:106
#define BOOSTINV2_NEG_VOUT_7V
Definition boostinv2.h:108
#define BOOSTINV2_NEG_VOUT_13V
Definition boostinv2.h:114
void application_task(void)
Definition main.c:66
Application Output
This Click board can be interfaced and monitored in two ways:
- Application Output - Use the "Application Output" window in Debug mode for real-time data monitoring. Set it up properly by following this tutorial.
- UART Terminal - Monitor data via the UART Terminal using a USB to UART converter. For detailed instructions, check out this tutorial.
Additional Notes and Information
The complete application code and a ready-to-use project are available through the NECTO Studio Package Manager for direct installation in the NECTO Studio. The application code can also be found on the MIKROE GitHub account.